/*    */ package com.qmsk.business.manage.community.controller;
/*    */ 
/*    */ import com.qmsk.business.manage.community.dao.CommunityDAO;
/*    */ import com.utils.gson.out.GsonEbRst;
/*    */ import com.utils.web.RequestUtils;
/*    */ import com.utils.web.ResponseUtils;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import org.apache.log4j.Logger;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Controller;
/*    */ import org.springframework.web.bind.annotation.PathVariable;
/*    */ import org.springframework.web.bind.annotation.RequestMapping;
/*    */ 
/*    */ @Controller
/*    */ @RequestMapping({"/community"})
/*    */ public class CommunityController
/*    */ {
/* 22 */   private static final Logger logger = Logger.getLogger(CommunityController.class);
/*    */ 
/*    */   @Autowired
/*    */   private CommunityDAO dao;
/*    */ 
/*    */   @RequestMapping(value={"find/community/communityId/{id}"}, method={org.springframework.web.bind.annotation.RequestMethod.GET})
/*    */   public void getListOptShopId(HttpServletRequest request, HttpServletResponse response, @PathVariable("id") Long id) {
/*    */     try {
/* 30 */       int nResult = this.dao.updateNum(id);
/* 31 */       if (nResult > 0)
/* 32 */         this.dao.commit();
/*    */       else {
/* 34 */         this.dao.rollback();
/*    */       }
/* 36 */       GsonEbRst gsonEbRst = this.dao.getGsonOfId(id);
/* 37 */       ResponseUtils.setResponseResult(gsonEbRst, response);
/*    */     } catch (Exception e) {
/* 39 */       this.dao.rollback();
/* 40 */       logger.error(e);
/* 41 */       ResponseUtils.setErrorMsgResponse(
/* 42 */         RequestUtils.getFindDataErrorMessage(request), response);
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.manage.community.controller.CommunityController
 * JD-Core Version:    0.5.3
 */